home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Genie / Projects / Pedestal / Source / Sources / Panes / PedPaneSubView.cc < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-24  |  1.5 KB  |  122 lines

  1. /*    ==================
  2.  *    PedPaneSubView.cc
  3.  *    ==================
  4.  */
  5.  
  6. #include "PedestalDebugging.h"
  7.  
  8. #include "PedPaneSubView.hh"
  9.  
  10.  
  11. PedPaneSubView::PedPaneSubView(PedView &inSuperView)
  12. : PedPane(inSuperView), mSubView(NULL)
  13. {
  14. }
  15.  
  16. PedPaneSubView::~PedPaneSubView()
  17. {
  18. }
  19.  
  20. void
  21. PedPaneSubView::Dispose()
  22. {
  23.     if (mSubView) {
  24.         mSubView->Dispose();
  25.         mSubView->release();
  26.         mSubView = NULL;
  27.     }
  28.     PedPane::Dispose();
  29. }
  30.  
  31. PedView &
  32. PedPaneSubView::SuperView()
  33. {
  34.     return mSuperView;
  35. }
  36.  
  37. void
  38. PedPaneSubView::SetSubView(PedViewSub *inView)
  39. {
  40.     if (inView) {
  41.         inView->retain();
  42.     }
  43.     if (mSubView) {
  44.         mSubView->release();
  45.     }
  46.     mSubView = inView;
  47. }
  48.  
  49. void
  50. PedPaneSubView::Open()
  51. {
  52.     if (mSubView) {
  53.         mSubView->Open();
  54.     }
  55. }
  56.  
  57. void
  58. PedPaneSubView::Close()
  59. {
  60.     if (mSubView) {
  61.         mSubView->Close();
  62.     }
  63. }
  64.  
  65. void
  66. PedPaneSubView::Activate()
  67. {
  68.     if (mSubView) {
  69.         mSubView->Activate();
  70.     }
  71. }
  72.  
  73. void
  74. PedPaneSubView::Deactivate()
  75. {
  76.     if (mSubView) {
  77.         mSubView->Deactivate();
  78.     }
  79. }
  80.  
  81. void
  82. PedPaneSubView::Resize(short inWidth, short inHeight)
  83. {
  84.     PedPane::Resize(inWidth, inHeight);
  85.     if (mSubView) {
  86.         mSubView->Resize(inWidth, inHeight);
  87.     }
  88. }
  89.  
  90. void
  91. PedPaneSubView::DrawContent()
  92. {
  93.     //Draw();
  94.     if (mSubView) {
  95.         mSubView->DrawContent();
  96.     }
  97. }
  98.  
  99. void
  100. PedPaneSubView::DispatchNullEvent(EventRecord &inEvent)
  101. {
  102.     if (mSubView) {
  103.         mSubView->DispatchNullEvent(inEvent);
  104.     }
  105. }
  106.  
  107. void
  108. PedPaneSubView::DispatchClickEvent(EventRecord &inEvent)
  109. {
  110.     if (mSubView) {
  111.         mSubView->DispatchClickEvent(inEvent);
  112.     }
  113. }
  114.  
  115. void
  116. PedPaneSubView::DispatchKey(EventRecord &inEvent)
  117. {
  118.     if (mSubView) {
  119.         mSubView->DispatchKey(inEvent);
  120.     }
  121. }
  122.